﻿<template>
    <div v-cloak class="flex-column bg-light">
        <component is="style" />
        <div class="flex-column-fill hidden margin-tb-20">
            <van-cell-group inset :border="false" class="hidden-x" style="max-height:100%;">
                <van-cell title-style="flex:none;min-width:150rpx;" v-for="item in list" :key="item.name"
                          :title="item.name" :value="item.money+'元'"></van-cell>
            </van-cell-group>
        </div>
        <van-cell title="合计" :value="sum+'元'"></van-cell>
    </div>
</template>
<script>
    module = (function (hxt) {        
        return {
            name: 'envelope',
            data: function () {                
                return {
                    optor: hxt.store.optor,
                    currentUser: JSON.parse(JSON.stringify(hxt.store.optor)),
                    browser: hxt.wxBrowser(), // 1：手机微信；4：小程序
                    list: [{ name: "爸爸", money: 600 }, { name: "妈妈", money: 600 }, { name: "花姐", money: 600 }, { name: "弟弟", money: 500 }, { name: "爷爷", money: 200 }, { name: "奶奶", money: 200 }, { name: "外公", money: 200 }, { name: "外婆", money: 200 }, { name: "表弟", money: 100 }, { name: "表妹", money: 100 }, { name: "妹", money: 100 }],
                };
            },
            computed: {
                sum: function () {
                    var _this = this;
                    return _this.list.reduce(function (prev, item) {
                        prev += item.money;
                        return prev;
                    }, 0);
                },
            },
            activated: function () {

            },
            watch: {
                
            },
            mounted: function () {
                var _this = this;
                _this.$parent.showHome = true;
            },
            methods: {
                
            },
            components: {
                hxtFileSelector: function () { return hxt.staticComponent(@Html.Raw(this.vueComponent("~/Views/wx/Components/hxt.FileSelector.cshtml"))); }
            }
        };
    })(window.$jscript.fn);
</script>
<style>
</style>